<?php

import('Form.~');
import('Form.Element.Fieldset');
import('Form.Element.InputText');
import('Form.Element.Select');
import('Form.Element.InputSubmit');
import('Form.Element.InputReset');


class FormAddVideo extends Hoa_Form {

	/**
	 * FormContact::__construct()
	 *
	 */
	public function __construct ( ) {

		/**
		 * On définit notre action.
		 */
		parent::__construct('#');

		$fieldset = new Hoa_Form_Element_Fieldset('Ajouter un article');

		$fieldset->addElements(array(
			'serveur'          => array(
			   'type'       => Hoa_Form::ELEMENT_SELECT,
			   'attribute'  => array(
			       'id'     => 'serveur',
			       'name'   => 'serveur'
			   ),
			   'option'     	 => array(
			       'vimeo'  	 => 'Vimeo',
			       'youtube' 	 => 'Youtube',
			       'dailymotion' => 'Dailymotion'
			   ),
			   'label'      => 'Serveur :'
			),
			'idVideo'          => array(
				'type'      => Hoa_Form::ELEMENT_INPUT_TEXT,
				'attribute' => array(
					'id'    => 'idVideo',
					'name'  => 'idVideo',
					'class' => 'ui-corner-all'
				),
				'validator' => array(
					'Empty'
				),
				'label'     => 'Identifiant :'
			)
		));

		/**
		 * On crée le bouton de soumission.
		 */
		$submit = new Hoa_Form_Element_InputSubmit('login');
		$reset = new Hoa_Form_Element_InputReset('reset');

		$fieldset->addElement($submit);
		$fieldset->addElement($reset);

		$this->addElement($fieldset);


	}
}